02. Intro to State

Intro To State

What is State?

When you localize a car, you’re interested in only the car’s position and it’s movement.

This is often called the state of the car.

  • The state of any system is a set of values that we care about.

In the cases we’ve been working with, the state of the car includes the car’s current **position, x, ** and its velocity, v.

In code this looks something like this:

x = 4
vel = 1

state = [x, vel]

Predicting Future States

The state gives us most of the information we need to form predictions about a car’s future location. And in this lesson, we’ll see how to represent state and how it changes over time.

For example, say that our world is a one-lane road, and we know that the current position of our car is at the start of this road, at the 0m mark. We also know the car’s velocity: it’s moving forward at a rate of 50m/s. These values are it’s initial state.

state = [0, 50]

The estimate of the initial state of the car.

The estimate of the initial state of the car.

Predict the State

Using our notation for state, what do you think the new state of the car will be after 3 seconds pass?

SOLUTION: [150, 50]